import { Redirect } from 'umi'

export default (props) => {

  //   const { isLogin } = useAuth();
  const ModalHint = () => {
    alert("请登录")
  }

  let aa = localStorage.getItem("login")

  if (aa) {
    return <div style={{height: "100%"}} className="88" >{props.children} </div>;
  } else {
    ModalHint()
    return <Redirect to="/login" />;
  }
}